package cn.sunxyz.data.db;

import org.apache.commons.dbutils.ResultSetHandler;

import java.sql.Connection;
import java.sql.SQLException;

/**
 * Created by yangrd on 2017/6/1.
 */
public interface SQLRunner {
    /**
     * 查詢
     */
    <T> T query(Connection conn, String sql, ResultSetHandler<T> rsh, Object... params) throws SQLException;

    /**
     * 增刪改
     */
    int update(Connection conn, String sql, Object... params) throws SQLException;
}
